const mongoose = require("mongoose");

var OrderSchema = new mongoose.Schema({
    complain: String,
    merchant: {type: mongoose.Schema.Types.ObjectId, ref: "merchant"},
    client: {type: mongoose.Schema.Types.ObjectId, ref: "client"},
    createDate: {
        type: Date,
        default: Date.now
    },
    receiveDate: Date,
    confirmDate: Date,
    confirm: Number,
    status: Number,
    grade: Number,
    total: Number,
    orderItem: Array,
    compainResult:String
});

mongoose.model("order", OrderSchema);